import i18n from '@/i18n'
import { DomainModel } from '@apps/meta/domain/model'
import { ApiProperty } from '@nestjs/swagger'

export class MetaPlatformGetBindDataSourceTypeMappingVo {
  @ApiProperty({ description: i18n.t('app-meta.vo.meta-platform-get-bind-data-source-type.12151169-0') })
  value: string

  @ApiProperty({ description: i18n.t('app-meta.vo.meta-platform-get-bind-data-source-type.12151169-1') })
  label: string
}

export class MetaPlatformGetBindDataSourceTypeVo {
  @ApiProperty({
    description: i18n.t('app-meta.vo.meta-platform-get-bind-data-source-type.12151169-2'),
    enum: DomainModel.ApiPropertyEnum.MetaResourceModelDataType,
  })
  type: DomainModel.MetaResourceModelDataType

  @ApiProperty({ description: i18n.t('app-meta.vo.meta-platform-get-bind-data-source-type.12151169-3') })
  name: string

  @ApiProperty({ description: i18n.t('app-meta.vo.meta-platform-get-bind-data-source-type.12151169-4') })
  isWrite: boolean

  @ApiProperty({ description: i18n.t('app-meta.vo.meta-platform-get-bind-data-source-type.12151169-5') })
  unit?: string

  @ApiProperty({ description: i18n.t('app-meta.vo.meta-platform-get-bind-data-source-type.12151169-6') })
  min?: number

  @ApiProperty({ description: i18n.t('app-meta.vo.meta-platform-get-bind-data-source-type.12151169-7') })
  max?: number

  @ApiProperty({ description: i18n.t('app-meta.vo.meta-platform-get-bind-data-source-type.12151169-8') })
  step?: number

  @ApiProperty({ description: i18n.t('app-meta.vo.meta-platform-get-bind-data-source-type.12151169-9') })
  stepStrictly?: boolean

  @ApiProperty({ description: i18n.t('app-meta.vo.meta-platform-get-bind-data-source-type.12151169-10') })
  precision?: number

  @ApiProperty({ description: i18n.t('app-meta.vo.meta-platform-get-bind-data-source-type.12151169-11') })
  pattern?: string

  @ApiProperty({ description: i18n.t('app-meta.vo.meta-platform-get-bind-data-source-type.12151169-12') })
  activeLabel?: string

  @ApiProperty({ description: i18n.t('app-meta.vo.meta-platform-get-bind-data-source-type.12151169-13') })
  inactiveLabel?: string

  @ApiProperty({
    description: i18n.t('app-meta.vo.meta-platform-get-bind-data-source-type.12151169-14'),
    type: [MetaPlatformGetBindDataSourceTypeMappingVo],
  })
  mappings?: MetaPlatformGetBindDataSourceTypeMappingVo[]

  @ApiProperty({
    description: i18n.t('app-meta.vo.meta-platform-get-bind-data-source-type.12151169-15'),
  })
  format?: string
}
